import React from './react';
import ReactDOM from './react-dom';

let element = <h1 style={{color: 'red'}} className="title">1</h1>
/*let element = React.createElement("h1", {
  style: {
    color: 'res'
  },
  className: "title"
}, "1");*/

console.log(element);

ReactDOM.render(
  element,
  document.getElementById('root')
);

/*
  $$typeof: Symbol(react.element)  react元素。虚拟DOM。可以跨平台
  {
    key: null   后面在DOM-diff的处理元素，提高diff性能
    ref: null   后面可以通过ref获取虚拟DOM，对应的真是的DOM
      props: {style: {…}, className: 'title', children: '1'}
    type: "h1"   元素的类型 tagName
  }
* */
